Optimal. Leaf size=75 \[ -\frac{\sqrt{a+b x^2} (A-B x)}{x}+A \sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )-\sqrt{a} B \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0586444, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, Rules used = {813, 844, 217, 206, 266, 63, 208} \[ -\frac{\sqrt{a+b x^2} (A-B x)}{x}+A \sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )-\sqrt{a} B \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 813
Rule 844
Rule 217
Rule 206
Rule 266
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{(A+B x) \sqrt{a+b x^2}}{x^2} \, dx &=-\frac{(A-B x) \sqrt{a+b x^2}}{x}-\frac{1}{2} \int \frac{-2 a B-2 A b x}{x \sqrt{a+b x^2}} \, dx\\ &=-\frac{(A-B x) \sqrt{a+b x^2}}{x}+(A b) \int \frac{1}{\sqrt{a+b x^2}} \, dx+(a B) \int \frac{1}{x \sqrt{a+b x^2}} \, dx\\ &=-\frac{(A-B x) \sqrt{a+b x^2}}{x}+(A b) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{x}{\sqrt{a+b x^2}}\right )+\frac{1}{2} (a B) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,x^2\right )\\ &=-\frac{(A-B x) \sqrt{a+b x^2}}{x}+A \sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )+\frac{(a B) \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b x^2}\right )}{b}\\ &=-\frac{(A-B x) \sqrt{a+b x^2}}{x}+A \sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )-\sqrt{a} B \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )\\ \end{align*}
Mathematica [A] time = 0.158958, size = 99, normalized size = 1.32 \[ \frac{\sqrt{a+b x^2} (B x-A)}{x}+\frac{\sqrt{a} A \sqrt{b} \sqrt{\frac{b x^2}{a}+1} \sinh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a+b x^2}}-\sqrt{a} B \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 97, normalized size = 1.3 \begin{align*} -B\sqrt{a}\ln \left ({\frac{1}{x} \left ( 2\,a+2\,\sqrt{a}\sqrt{b{x}^{2}+a} \right ) } \right ) +B\sqrt{b{x}^{2}+a}-{\frac{A}{ax} \left ( b{x}^{2}+a \right ) ^{{\frac{3}{2}}}}+{\frac{Abx}{a}\sqrt{b{x}^{2}+a}}+A\sqrt{b}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.62062, size = 821, normalized size = 10.95 \begin{align*} \left [\frac{A \sqrt{b} x \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + B \sqrt{a} x \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) + 2 \, \sqrt{b x^{2} + a}{\left (B x - A\right )}}{2 \, x}, -\frac{2 \, A \sqrt{-b} x \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - B \sqrt{a} x \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) - 2 \, \sqrt{b x^{2} + a}{\left (B x - A\right )}}{2 \, x}, \frac{2 \, B \sqrt{-a} x \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) + A \sqrt{b} x \log \left (-2 \, b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{b} x - a\right ) + 2 \, \sqrt{b x^{2} + a}{\left (B x - A\right )}}{2 \, x}, -\frac{A \sqrt{-b} x \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - B \sqrt{-a} x \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) - \sqrt{b x^{2} + a}{\left (B x - A\right )}}{x}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 3.55214, size = 124, normalized size = 1.65 \begin{align*} - \frac{A \sqrt{a}}{x \sqrt{1 + \frac{b x^{2}}{a}}} + A \sqrt{b} \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )} - \frac{A b x}{\sqrt{a} \sqrt{1 + \frac{b x^{2}}{a}}} - B \sqrt{a} \operatorname{asinh}{\left (\frac{\sqrt{a}}{\sqrt{b} x} \right )} + \frac{B a}{\sqrt{b} x \sqrt{\frac{a}{b x^{2}} + 1}} + \frac{B \sqrt{b} x}{\sqrt{\frac{a}{b x^{2}} + 1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19394, size = 138, normalized size = 1.84 \begin{align*} \frac{2 \, B a \arctan \left (-\frac{\sqrt{b} x - \sqrt{b x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} - A \sqrt{b} \log \left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right ) + \sqrt{b x^{2} + a} B + \frac{2 \, A a \sqrt{b}}{{\left (\sqrt{b} x - \sqrt{b x^{2} + a}\right )}^{2} - a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]